<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="com.is.util.ParamUtil"%>
<%@page import="com.is.control.ParamCourseScoreGSControl"%>
<%@page import="com.is.model.ParamCourseScoreGS"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>留学生预科班</title>
<link rel="shortcut icon" href="/InterStu/resources/image/favicon.ico" />
<link href="../../resources/css/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../resources/js/jquery-1.8.1.js"></script>
<script type="text/javascript" src="../../resources/js/jquery.artDialog.js"></script>
</head>
<body>
<% 
	request.setCharacterEncoding("UTF-8");
	response.setCharacterEncoding("UTF-8");
	int id = ParamUtil.getInt(request,"id");
	int courseClassId = ParamUtil.getInt(request,"courseClassId");
	System.out.print(courseClassId + "ddddd" +id);
	String daily = ParamUtil.getString(request,"daily","40");
	String minterm = ParamUtil.getString(request,"midterm","30");
	String finalterm = ParamUtil.getString(request,"final","30");
	String attPer = ParamUtil.getString(request,"cq","30");
	ParamCourseScoreGS gs = new ParamCourseScoreGS();
	gs.setDailyScore_per(daily);
	gs.setMiderScore_per(minterm);
	gs.setFinalScore_per(finalterm);
	gs.setCourseClassId(courseClassId);
	gs.setAttendance_per(attPer);
	if(ParamCourseScoreGSControl.updateGS(gs,id)){
%>
	<script type="text/javascript">
		$.dialog({
			content:"系统已更改该课程的成绩分布,<br/>请重新进入页面录入成绩！",
			icon:"succeed",
			ok:function(){
				window.location = document.referrer;
			}
		})
	</script>
<%
	} else{
%>
	<script type="text/javascript">
		$.dialog({
			content:"系统更改该课程出错！",
			icon:"error",
			ok:function(){
				window.history.go(-1);
			}
		})
	</script>
<%	
	}
%>
</body>
</html>